Skip to content
This repository has been archived by the owner on Aug 2, 2021. It is now read-only.

swap, contracts, vendor: move to ERC20 #1964

Merged
merged 25 commits into from
Dec 3, 2019
Merged

swap, contracts, vendor: move to ERC20 #1964

merged 25 commits into from
Dec 3, 2019

Conversation

ralph-pichler
Copy link
Member

@ralph-pichler ralph-pichler commented Nov 19, 2019

  • Updates go-bindings to the version that supports ERC20
  • Updates test-suite to work with ERC20 enabled chequebook
  • Decouple deposit from deployment
  • Rename initialDepositAmount to depositAmount
  • Remove deploy retries loop
  • add skipDeposit flag

note: while tests pass not all logic has been updated yet
contracts/swap/swap.go Outdated Show resolved Hide resolved
api/config.go Outdated Show resolved Hide resolved
contracts/swap/swap.go Outdated Show resolved Hide resolved
swap/swap.go Outdated Show resolved Hide resolved
swap/swap.go Outdated Show resolved Hide resolved
Copy link
Contributor

@holisticode holisticode left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In general great work, the core of it is ready to merge.

Just a couple of questions, check them please.
And some issues:

  • use the "natural" zero value of big.Int instead of creating a new instance all the time
  • I often get remarks that I comment too much, but I maintain better too much comments than too little. Generally, don't ignore return values, and if the test really can, comment why.

swap/swap.go Outdated Show resolved Hide resolved
swap/swap.go Outdated Show resolved Hide resolved
swap/swap.go Outdated Show resolved Hide resolved
swap/swap.go Show resolved Hide resolved
swap/swap_test.go Show resolved Hide resolved
swap/swap_test.go Outdated Show resolved Hide resolved
swap/swap_test.go Show resolved Hide resolved
swap/swap_test.go Outdated Show resolved Hide resolved
Copy link
Contributor

@holisticode holisticode left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A small nitpick but approving.

Generally though, for future PRs, I see a lot if ignored return values in the tests. It indeed looks like they are not needed for the tests in question, which is why I approve, but it is generally a rejected practice in the project, and should be avoided whenever possible.

swap/swap.go Outdated Show resolved Hide resolved
swap/swap.go Show resolved Hide resolved
Copy link
Contributor

@mortelli mortelli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i've left some questions in order to better understand these changes before giving my approvial.

besides these, i'd like to ask: why did we go for a mintable ERC20 instead of a regular one?

finally: please create an issue (if there isn't one already) for the Ropsten factory update in case this is still pending.

cmd/swarm/config.go Outdated Show resolved Hide resolved
swap/swap.go Outdated Show resolved Hide resolved
swap/swap_test.go Outdated Show resolved Hide resolved
contracts/swap/swap.go Show resolved Hide resolved
contracts/swap/swap.go Outdated Show resolved Hide resolved
swap/simulations_test.go Show resolved Hide resolved
swap/swap.go Outdated Show resolved Hide resolved
swap/swap.go Outdated Show resolved Hide resolved
swap/swap.go Show resolved Hide resolved
swap/swap.go Outdated Show resolved Hide resolved
@mortelli
Copy link
Contributor

mortelli commented Dec 2, 2019

heads-up: it seems the vendoring should be checked as well

@Eknir Eknir merged commit 0240dd1 into master Dec 3, 2019
@ralph-pichler ralph-pichler deleted the swap-erc20 branch January 10, 2020 15:57
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants